package DButlit;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Bedding {
    static final String url = "jdbc:mysql://localhost:3306/info?characterEncoding=utf8";
    static final String user = "root";
    static final String pwd = "xflovexz";
    static {
        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }
    public static Connection getConn() throws SQLException {
        Connection conn = DriverManager.getConnection(url, user, pwd);
        return conn;
    }
}
